function [time,mean,std] = lpcvd_Load_SinkToFile(filename,mode)
% Syntax:
%  [time,mean,std] = lpcvd_Load_SinkToFile(FILENAME,0);
%  [time,detailed] = lpcvd_Load_SinkToFile(FILENAME,1);

if nargin == 1
    mode = 0;
end
fid = fopen(filename);
if(fid<0)% open failed
    error('Failed to open %s\n',filename);
end
switch mode
    case 0% Save average and std
        formatstring = '%f %f %f';
        data = textscan(fid,formatstring);
        time = data{1};
        mean = data{2};
        std = data{3};
end

fclose(fid);